﻿
@using Abp.Extensions
@using Abp.Application.Services.Dto
@using KDS.Mes.Web.Models.Common.Modals
@using KDS.Mes.Web.Models.Parts

@model CreateOrEditPartModalViewModel

@* 初始化头部 *@
@Html.Partial("~/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("EditPart") + ": " + Model.Part.AlcCodeId) : L("CreatePart")))


<!--html代码区域-->
<div class="modal-body">
    <form name="partInformationsForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Part.Id" />
        <div>
            <div hidden="hidden">
                @if (Model.IsEditMode)
            {
                    <input type="hidden" name="Id" value="@Model.Part.Id" />
                }
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group ">
                        <label for="alcCodeIdEdit">@L("AlcCodeId")</label>
                        @Html.DropDownList("AlcCodeId", Model.AlcCodes.Select(a => a.ToSelectListItem()), new
                   {
                       @class = "form-control selectpicker",
                       data_live_search = "true",
                       title = L("PlaaseSelect"),
                       id = "alcCodeIdEdit"
                   })
                    </div>
                    <div class="form-group ">
                        <label>@L("SeatNo")   <span class="required"> * </span>	 	</label>
                        <input class="maxlength-handler form-control @(Model.Part.SeatNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="SeatNo" value="@Model.Part.SeatNo" required maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("BackrestAssemblyNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BackrestAssemblyNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BackrestAssemblyNo" value="@Model.Part.BackrestAssemblyNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("BackrestCoverNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BackrestCoverNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BackrestCoverNo" value="@Model.Part.BackrestCoverNo" maxlength="50" />
                    </div>
                    <div class="form-group">
                        <label>@L("BackrestFoamNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BackrestFoamNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BackrestFoamNo" value="@Model.Part.BackrestFoamNo" maxlength="50" />
                    </div>
                    <div class="form-group  ">
                        <label>@L("BackFrameNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BackFrameNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BackFrameNo" value="@Model.Part.BackFrameNo" maxlength="50" />
                    </div>

                    <div class="form-group ">
                        <label>@L("HeadrestNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.HeadrestNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="HeadrestNo" value="@Model.Part.HeadrestNo" maxlength="50" />
                    </div>

                    <div class="form-group  ">
                        <label>@L("ArmRestNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.ArmRestNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="ArmRestNo" value="@Model.Part.ArmRestNo" maxlength="50" />
                    </div>

                    <div class="form-group ">
                        <label>@L("BackplaneNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BackplaneNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BackplaneNo" value="@Model.Part.BackplaneNo" maxlength="50" />
                    </div>

                    <div class="form-group ">
                        <label>@L("AdjusterPlateNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.AdjusterPlateNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="AdjusterPlateNo" value="@Model.Part.AdjusterPlateNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("ThreadColorNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.ThreadColorNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="ThreadColorNo" value="@Model.Part.ThreadColorNo" maxlength="50" />
                    </div>
                </div>
                <div class="col-sm-6">

                    <div class="form-group ">
                        <label for="seatPositionIdEdit">@L("SeatPositionId")</label>
                        @Html.DropDownList("SeatPositionId", Model.SeatPositions.Select(a => a.ToSelectListItem()), new
                   {
                       @class = "form-control selectpicker",
                       data_live_search = "true",
                       title = L("PlaaseSelect"),
                       id = "seatPositionIdEdit"
                   })
                    </div>
                    <div class="form-group form-md-line-input form-md-floating-label  ">
                        <label>@L("CushionAssemblyNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.CushionAssemblyNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="CushionAssemblyNo" value="@Model.Part.CushionAssemblyNo" maxlength="50" />
                    </div>

                    <div class="form-group  ">
                        <label>@L("SlideNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.SlideNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="SlideNo" value="@Model.Part.SlideNo" maxlength="50" />
                    </div>

                    <div class="form-group  ">
                        <label>@L("CushionCoverNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.CushionCoverNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="CushionCoverNo" value="@Model.Part.CushionCoverNo" maxlength="50" />
                    </div>

                    <div class="form-group  ">
                        <label>@L("CushionFoamNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.CushionFoamNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="CushionFoamNo" value="@Model.Part.CushionFoamNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("SABNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.SABNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="SABNo" value="@Model.Part.SABNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("CenterHeadrestNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.CenterHeadrestNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="CenterHeadrestNo" value="@Model.Part.CenterHeadrestNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("BuckleNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.BuckleNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="BuckleNo" value="@Model.Part.BuckleNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("SittingBasinNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.SittingBasinNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="SittingBasinNo" value="@Model.Part.SittingBasinNo" maxlength="50" />
                    </div>
                    <div class="form-group ">
                        <label>@L("AdjusterNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.AdjusterNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="AdjusterNo" value="@Model.Part.AdjusterNo" maxlength="50" />
                    </div>
                    <div class="form-group">
                        <label>@L("CushioSsupportNo") </label>
                        <input class="maxlength-handler form-control @(Model.Part.CushioSsupportNo.IsNullOrEmpty() ? "" : " edited")" type="text" name="CushioSsupportNo" value="@Model.Part.CushioSsupportNo" maxlength="50" />
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
@Html.Partial("~/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")